Skip to content

Conversation

@amandarangel
Copy link

No description provided.

Copy link
Author

@amandarangel amandarangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parabéns, pessoal!!! O trabalho de vocês ficou bem legal e vocês conseguiram trabalhar muito bem em grupo! Deixei só algumas observações no código! Estou muito feliz com o resultado que vocês apresentaram!! Continuem assim!


if(!user){
throw new Error("Usuário não existe")
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excelente verificação!


const userRelationDatabase = new UserRelationDatabase();
await userRelationDatabase.undoFriend(userId, undoFriendshipUserId)
await userRelationDatabase.undoFriend(undoFriendshipUserId, userId)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ficou repetido aqui! rs

Ahhh, uma coisa legal de fazer, tanto na hora de fazer amizade, quanto na hora de desfazer, é verificar se já existe amizade entre os dois usuários!


}

async get(token:string){
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O médoto com o nome apenas get no UserBusiness me faz pensar que é um método para pegar o usuário e não o feed! Vale ser um pouquinho mais específico aqui :)

const posts: Post[] = [];

for (let post of result) {
posts.push(Post.toPostModel(post));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show!!!

} catch (error) {
res.status(400).send({
messege: error.messege
})
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Endpoint super bem estruturado!!

@laisflaviosilva laisflaviosilva merged commit 7a88b86 into correcao-projeto Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants